package ioperation;

import book.BookList;

public class ShowOperation implements IOperations{
    @Override
    public void work(BookList bookList) {
        System.out.println("--------打印图书--------");
        int currentSize = bookList.getUsedSize();
        if(currentSize == 0) {
            System.out.println("此时书架为空");
            return;
        }
        for (int i = 0; i < currentSize; i++) {
            System.out.println(bookList.getBook(i));
        }
    }
}
